package ecustom.common.servicelog.service;

import ecustom.common.CustomMap;
import ecustom.common.mode.service.ModeService;
import ecustom.common.util.CustomUtil;
import ecustom.common.util.PropUtil;

public class ServiceLogBodyService {
	
	private ModeService modeService = new ModeService();

	public int save(String body) throws Exception {
		CustomMap fields = new CustomMap();
		fields.put("BODY", body);
		return modeService.createBillAndShare(1, getModeId(), "UF_ESERVICELOGBODY", fields);
	}
	
	public int getModeId() {
		String value = PropUtil.getStringCK("servicelog.body.mode.id");
		return CustomUtil.getIntCK(value, "szbaps01.properties->servicelog.body.mode.id value is not a integer!");
	}
}
